function [feat thresh conf] = weaklearner_template(wl,trainpats,weight);

% Template for defining weak learner functions for AdaBoost.  Implements
% learning function and chooses a returned weak hypothesis.  See
% decisionStump.m for an example.
%
% License:
%=====================================================================
%
% This is part of the Princeton MVPA toolbox, released under
% the GPL. See http://www.csbmb.princeton.edu/mvpa for more
% information.
% 
% The Princeton MVPA toolbox is available free and
% unsupported to those who might find it useful. We do not
% take any responsibility whatsoever for any problems that
% you have related to the use of the MVPA toolbox.
%
% ======================================================================
% Author: Melissa K. Carroll
%
% For now, the chosen weak hypothesis must be of the form of a binary
% feature/threshold combination and associated confidence scores for the
% target classes.
%
% Required input arguments passed from train_adaboost.m:
%
% - wl: weak learner parameters initialized by weak learner initialization
% (see weaklearnerinitialize_template.m)
%
% - trainpats: training patterns passed to classifier from
% cross_validation.m
%
% - weight: weights of the weak hypotheses generated by AdaBoost so far.
%
% Required output (defining the weak hypothesis)
%
% - feat: feature number (i.e. row in trainpats)
%
% - thresh: threshold value for feature
%
% - conf: nOUT x 2 matrix defining confidence scores for each of the target
% classes when feat is below thresh value (col 1) or above thresh value
% (col 2).

[feat thresh conf] = weaklearner_template(wl,trainpats,weight);
